package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeMaincheckharmcontraindicationMapper;
import com.dime.physical.domain.DimeMaincheckharmcontraindication;
import com.dime.physical.service.IDimeMaincheckharmcontraindicationService;

/**
 * 危害对应的禁忌症Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-17
 */
@Service
public class DimeMaincheckharmcontraindicationServiceImpl implements IDimeMaincheckharmcontraindicationService 
{
    @Autowired
    private DimeMaincheckharmcontraindicationMapper dimeMaincheckharmcontraindicationMapper;

    /**
     * 查询危害对应的禁忌症
     * 
     * @param id 危害对应的禁忌症主键
     * @return 危害对应的禁忌症
     */
    @Override
    public DimeMaincheckharmcontraindication selectDimeMaincheckharmcontraindicationById(String id)
    {
        return dimeMaincheckharmcontraindicationMapper.selectDimeMaincheckharmcontraindicationById(id);
    }

    /**
     * 查询危害对应的禁忌症列表
     * 
     * @param dimeMaincheckharmcontraindication 危害对应的禁忌症
     * @return 危害对应的禁忌症
     */
    @Override
    public List<DimeMaincheckharmcontraindication> selectDimeMaincheckharmcontraindicationList(DimeMaincheckharmcontraindication dimeMaincheckharmcontraindication)
    {
        return dimeMaincheckharmcontraindicationMapper.selectDimeMaincheckharmcontraindicationList(dimeMaincheckharmcontraindication);
    }

    /**
     * 新增危害对应的禁忌症
     * 
     * @param dimeMaincheckharmcontraindication 危害对应的禁忌症
     * @return 结果
     */
    @Override
    public int insertDimeMaincheckharmcontraindication(DimeMaincheckharmcontraindication dimeMaincheckharmcontraindication)
    {
        dimeMaincheckharmcontraindication.setCreateTime(DateUtils.getNowDate());
        return dimeMaincheckharmcontraindicationMapper.insertDimeMaincheckharmcontraindication(dimeMaincheckharmcontraindication);
    }

    /**
     * 修改危害对应的禁忌症
     * 
     * @param dimeMaincheckharmcontraindication 危害对应的禁忌症
     * @return 结果
     */
    @Override
    public int updateDimeMaincheckharmcontraindication(DimeMaincheckharmcontraindication dimeMaincheckharmcontraindication)
    {
        dimeMaincheckharmcontraindication.setUpdateTime(DateUtils.getNowDate());
        return dimeMaincheckharmcontraindicationMapper.updateDimeMaincheckharmcontraindication(dimeMaincheckharmcontraindication);
    }

    /**
     * 批量删除危害对应的禁忌症
     * 
     * @param ids 需要删除的危害对应的禁忌症主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmcontraindicationByIds(String[] ids)
    {
        return dimeMaincheckharmcontraindicationMapper.deleteDimeMaincheckharmcontraindicationByIds(ids);
    }

    /**
     * 删除危害对应的禁忌症信息
     * 
     * @param id 危害对应的禁忌症主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmcontraindicationById(String id)
    {
        return dimeMaincheckharmcontraindicationMapper.deleteDimeMaincheckharmcontraindicationById(id);
    }
}
